"""
要求输入员工的薪资，若薪资小于 0 则重新输入。最后打印出录入员工的数量和薪资明细，以及平均薪资



"""

worker_count = 0
salary = 0

while salary == 0:
    flag = 1
    while flag == 1:
        flag = int(input("是否录入员工信息：1-录入，其他退出"))
        if flag != 1:
            if salary != 0:
                avg_salary = salary/worker_count
            break
        worker = input("员工姓名：")
        salary = float(input("薪水:"))
        worker_count += 1
        salary += salary
    else :
        print("停止录入")

print(f"员工:{worker_count}名,平均薪资{avg_salary}")

